{% load common_extras %}
<html>
<head>
	<script type="text/javascript" src="/site_media/js/jquery/jquery.min.js"></script>
	
	<script language="Javascript" src="/site_media/jqueryedit/htmlbox.colors.js" type="text/javascript"></script>
	<script language="Javascript" src="/site_media/jqueryedit/htmlbox.styles.js" type="text/javascript"></script>
	<script language="Javascript" src="/site_media/jqueryedit/htmlbox.syntax.js" type="text/javascript"></script>
	<script language="Javascript" src="/site_media/jqueryedit/xhtml.js" type="text/javascript"></script>
	<script language="Javascript" src="/site_media/jqueryedit/htmlbox.full.js" type="text/javascript"></script>
	<meta http-equiv="content-type" content="text/html; charset=utf8" />
	<script type="text/javascript">
	$(document).ready(function()	{
		$("#content").css("height","100%").css("width","100%").htmlbox({
		    toolbars:[
			    [
				// Cut, Copy, Paste
				"separator","cut","copy","paste",
				// Undo, Redo
				"separator","undo","redo",
				// Bold, Italic, Underline, Strikethrough, Sup, Sub
				"separator","bold","italic","underline","strike","sup","sub",
				// Left, Right, Center, Justify
				"separator","justify","left","center","right",
				// Ordered List, Unordered List, Indent, Outdent
				"separator","ol","ul","indent","outdent",
				// Hyperlink, Remove Hyperlink, Image
				"separator","link","unlink","image"
				],
				[// Show code
				"separator","code",
		        // Formats, Font size, Font family, Font color, Font, Background
		        "separator","formats","fontsize","fontfamily",
				"separator","fontcolor","highlight",
				],
				[
				//Strip tags
				"separator","removeformat","striptags","hr","paragraph",
				// Styles, Source code syntax buttons
				"separator","quote","styles","syntax"
				]
			],
			skin:"blue"
		});
		
		 $('a.delete').click(function() {
			 
		 });
	});
	</script>
</head>
<body>
<form id="upload" enctype="multipart/form-data" action="/admin/pic_add/" method="post">  
	<input type="file" name="imagefile" />
	<input type="hidden" id="id" name="id" value="{{articleinfo.id}}" />
	<input type="submit" value="上传" />
</form>
{%ifnotequal imgcontent_split None %}
		{%for img in imgcontent_split%}
			{%ifnotequal img ''%}
				<img width="130" height="190" src="/site_media/UploadImg/{{img}}" />
				<a class="deletepic" href="javascript:void(0)">删除</a>
			{%endifnotequal%}
		{%endfor%}
{%endifnotequal%}
<form action="/admin/article_add/" method="post" >
<table cellspacing="5" class="tablesorter" >
	<input type="hidden" id="id" name="id" value="{{articleinfo.id}}" />
	<tr>
		<td>标题:</td>
		<td><input type="text" value="{{articleinfo.title}}" id="title" name="title" size="80" maxlength="62" /></td>
		<td><input type="submit" value="提交"  /> <input type="button" value="返回" onclick="history.go(-1)" /></td>
	</tr>
	<tr>
		<td>创建时间:</td>
		<td><input type="text" id="created_time" name="created_time" value="{{articleinfo.created_time}}" /></td>
	</tr>
	<tr>
		<td>作者:</td>
		<td><input type="text" id="author" name="author" value="{{articleinfo.author}}" /></td>
	</tr>
	<tr>
		<td>来源:</td>
		<td><input type="text" id="froms" name="froms" value="{{articleinfo.froms}}" /></td>
	</tr>
	<tr>
		<td>来源连接:</td>
		<td><input type="text" id="from_url" name="from_url" value="{{articleinfo.from_url}}" /><a href="{{articleinfo.from_url}}" target="_blank">点击我过去</a></td>
	</tr>
	<tr>
		<td>摘要:</td>
		<td><textarea id="digest" name="digest" cols="80" rows="5">{{articleinfo.digest}}</textarea></td>
	</tr>
</table>
<textarea id="content" name="content" cols="80" rows="20">{{articleinfo.content}}</textarea> <br/>
<div align="center">
<input type="submit" value="提交" />
<input type="button" value="返回" onclick="history.go(-1)" />
</div>
</form>
</body>
</html>